﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Teacher.Master" AutoEventWireup="true" CodeBehind="TStuManN.aspx.cs" Inherits="WebSystem.TStuManN" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .auto-style1 {
            width: 100%;
        }
        .auto-style2 {
            height: 20px;
        }
        .auto-style3 {
            text-align: right;
            width: 254px;
        }
        .auto-style4 {
            height: 20px;
            text-align: right;
            width: 254px;
        }
        .auto-style5 {
            height: 20px;
            width: 440px;
        }
        .auto-style6 {
            width: 440px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <br />
    <table class="auto-style1">
        <tr>
            <td class="auto-style4">
                <asp:Label ID="Label2" runat="server" Text="输入班级"></asp:Label>
                </td>
            <td class="auto-style5">
                <asp:TextBox ID="txtCno1" runat="server"></asp:TextBox>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="BTN" runat="server" OnClick="BTN_Click" Text="显示成绩" />
            </td>
            <td class="auto-style2">&nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style3">&nbsp;</td>
            <td class="auto-style6">&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style3">
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:dhd2014115121ConnectionString %>" SelectCommand="SELECT * FROM [Score] WHERE ([Classno] = @Classno)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="txtCno1" Name="Classno" PropertyName="Text" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
                </td>
            <td class="auto-style6">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="Sno,Cno" DataSourceID="SqlDataSource2">
                    <Columns>
                        <asp:BoundField DataField="Sno" HeaderText="学号" ReadOnly="True" SortExpression="Sno" />
                        <asp:BoundField DataField="Sname" HeaderText="姓名" SortExpression="Sname" />
                        <asp:BoundField DataField="Cno" HeaderText="课程编号" ReadOnly="True" SortExpression="Cno" />
                        <asp:BoundField DataField="grade" HeaderText="成绩" SortExpression="grade" />
                        <asp:BoundField DataField="Classno" HeaderText="班级" SortExpression="Classno" />
                    </Columns>
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:dhd2014115121ConnectionString %>" SelectCommand="SELECT * FROM [Score] WHERE ([Classno] = @Classno)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="txtCno1" Name="Classno" PropertyName="Text" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
                </td>
            <td>
                <asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="返回" />
            </td>
        </tr>
    </table>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
</asp:Content>
